package Epic;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Given 2 = ABC, 3=DEF... and so on...generate all possible sequences
 *  for a given phone number...
 * @author Ray
 *
 */
public class CombinationOf_Tel {

	public static final String[] tel = {"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
	
	public static void printSequence(String num){
		if(num==null || num.length()==0) return;
		ArrayList<String> result = letterCombination(num);
		for(String cur:result){
			System.out.println(cur);
		}
	}
	
	private static ArrayList<String> letterCombination(String digits){
		ArrayList<String> ret = new ArrayList<String>();
		ret.add("");
		for(int i=0;i<digits.length();++i){
			ArrayList<String> temp = new ArrayList<String>();
			String str = tel[digits.charAt(i)-'0'];
			for(int j=0;j<ret.size();++j){
				for(int k=0;k<str.length();++k){
					temp.add(ret.get(j)+str.charAt(k));
				}
			}
			ret = temp;
		}
		return ret;
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String num = in.nextLine();
		printSequence(num);
		in.close();
	}

}
